import pytest
from baseTools.my_logger import myLog
import os

# 获取根路径
obj_path = os.path.dirname(__file__)

# 启动文件
if __name__ == "__main__":
    myLog.info("开始执行接口自动化测试".center(50,"*"))
    pytest.main()
    myLog.info("结束执行接口自动化测试".center(50,"*"))


    myLog.info("开始生成测试报告".center(50,"*"))
    os.system(r"E:\TestTools\Allure\allure-commandline-2.13.2\allure-2.13.2\bin\allure generate .\report\json_report -o .\report\html_report")
    myLog.info("测试报告生成成功".center(50,"*"))

